$(function () {
    var $doc = $(document),
        obj = {
            init: function () {
                this.event();
            },
            event: function () {
                $('.register-type a').click(function (e) {
                    e.preventDefault();
                    $(this).addClass('active').siblings().removeClass('active');
                    $('#register :hidden').val($(this).data('type'));
                });

                $('.owl-carousel').owlCarousel({
                    items:1,
                    loop:true,
                    autoPlay:false,
                    nav:true,
                    dots:true,
                    touchDrag:false
                });
                if($('.panel').length)
                {
                    $.post('/Metalandquotation/GetPriceByType',{priceType:12},function(res)
                    {
                        console.log(res)
                    });

                    $.post('/Metalandquotation/GetTrendChartByName',{name:'XAU',chartType:6},function(res)
                    {
                        console.log(res)
                    });
                }
            }
        };
    obj.init();
});
//window.onload=function(){
//    console.log(window.innerHeight)
//}